﻿module Mapparola.Core {

    export class PersonalDiscussionsGet {

        //client and server
        public type: RestType = RestType.GET;
        public param: string;

        //server
        public _serverProperties: RestServerBase;

        constructor() {
            this._serverProperties = new RestServerBase("/discussion/GET/personalDiscussion");
        }
    }

    export class PersonalDiscussionPost {

        //client and server
        public type: RestType = RestType.POST;
        public param: string;

        //server
        public _serverProperties: RestServerBase;

        constructor() {
            this._serverProperties = new RestServerBase("/discussion/POST/personalDiscussion");
        }
    }

    export class DiscussionPost {

        //client and server
        public type: RestType = RestType.POST;
        public param: Discussion;

        //server
        public _serverProperties: RestServerBase;

        constructor() {
            this._serverProperties = new RestServerBase("/discussion/POST/saveDiscussion");
        }
    }

    export class ViewedDiscussionPost {

        //client and server
        public type: RestType = RestType.POST;
        public param: string;

        //server
        public _serverProperties: RestServerBase;

        constructor() {
            this._serverProperties = new RestServerBase("/discussion/POST/viewedDiscussion");
        }
    }

    export class NewDiscussionsGet {

        //client and server
        public type: RestType = RestType.GET;
        public param: Point;

        //server
        public _serverProperties: RestServerBase;

        constructor() {
            this._serverProperties = new RestServerBase("/discussion/GET/newDiscussion");
        }
    }
}

declare var exports: any;
if (typeof exports != 'undefined') {
    exports.PersonalDiscussionsGet = Mapparola.Core.PersonalDiscussionsGet;
    exports.PersonalDiscussionPost = Mapparola.Core.PersonalDiscussionPost;
    exports.DiscussionPost = Mapparola.Core.DiscussionPost;
    exports.ViewedDiscussionPost = Mapparola.Core.ViewedDiscussionPost;
    exports.NewDiscussionsGet = Mapparola.Core.NewDiscussionsGet;
}